<%@ page language="java" pageEncoding="ISO-8859-1"%>

<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-template" prefix="template" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html locale="true">
  <head>
    <html:base />
    
    <title>addpolicestation.jsp</title>

	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body bgcolor="pink">
    <html:form action="apsa">
    <div align="center">
    
    <%
    
       Object ob=request.getAttribute("PSIDVALUE");
       Object ob1=request.getAttribute("DATA");
       %>
     
    <table border="0" width="38%">
	<tr>
	  <%
     if(ob!=null)
     {
     %>
		<td width="18%">police station ID</td>
		<td width="20%"><html:text readonly="true" property="psi" value="<%=ob.toString() %>"></html:text> </td>
	</tr>
	<%} 
	if (ob1!=null) 

			 {

			 %>
			 
	<tr>
		<td width="18%">police Station Name</td>
		<td width="20%"><html:text property="psn" value=""></html:text></td>
	</tr>
	<tr>
		<td width="18%">police Station Headquarter</td>
		<td width="20%"><html:text property="psh" value=""></html:text></td>
	</tr>
	<tr>
		<td width="18%">Effect Date</td>
		<td width="20%"><html:text property="ed" value=""></html:text></td>
	</tr>
	
	<tr>
		<td colspan="2"><html:submit property="apsp" value="ADDPOLICESTATION"></html:submit> </td>
	</tr>
	
	<tr>
	    <td>&nbsp;</td>
		<td><%=ob1.toString() %>  </td>
	</tr>
	<%} 
	else
	{
	%>
	<tr>
		<td width="18%">police Station Name</td>
		<td width="20%"><html:text property="psn"></html:text></td>
	</tr>
	<tr>
		<td width="18%">police Station Headquarter</td>
		<td width="20%"><html:text property="psh"></html:text></td>
	</tr>
	<tr>
		<td width="18%">Effect Date</td>
		<td width="20%"><html:text property="ed"></html:text></td>
	</tr>
	
	<tr>
		<td colspan="2"><html:submit property="apsp" value="ADDPOLICESTATION"></html:submit> </td>
	</tr>
	
	
	<%} %>
	<tr>

			<td colspan="2"><a href="<%=request.getContextPath()%>/apsa.do?apsp=viewpolicestation">View/Edit</a></td>

		</tr>
	
</table>

    
   </div> 
    
    </html:form>
  </body>
</html:html>
